package com.qinggeng.project.system.service;

import com.qinggeng.project.api.dto.JobDliveryDTO;
import com.qinggeng.project.system.domain.JobDlivery;

import java.util.List;

public interface JobDliveryService {

    //用户投递简历
    boolean insertJobUserDlivery(JobDlivery jobDlivery);


    //公司邀请用户
    boolean insertCompanyDlivery(JobDliveryDTO jobDlivery);


    //查询集合 List<JobDlivery> 根据 投递者id
    List<JobDlivery> listJobDliveryByResumeUserId();

    //查询集合 List<JobDlivery> 根据 职位id
    List<JobDlivery> listJobDliveryByPositionUserId();

    //查询 get
    JobDlivery getJobDliveryById(JobDlivery jobDlivery);

    /**
     * 根据发布者id获取面试邀请次数
     * @return
     */
    Integer getJobDeliveryCountByPositionUserId();

    /**
     * 根据求职者id获取简历投递次数
     * @return
     */
    Integer getJobDeliveryCountByResumeUserId();

    //该用户是否投递过简历 投递过 true  没有投递过 false
    boolean getDliveryByResumeUserIdAndPositionId(JobDlivery jobDlivery);



    JobDlivery getDlivery(JobDlivery jobDlivery);

    /**
     * 根据求职者ID、职位ID和类型获取投递信息
     * @param jobDlivery
     * @return
     */
    JobDlivery getDeliveryByResumeUserIdAndPositionIdAndType(JobDlivery jobDlivery);

    /**
     * 根据求职者Id、发布者ID和类型获取投递信息
     * @param jobDlivery
     * @return
     */
    JobDlivery getDeliveryByResumeUserIdAndPositionUserIdAndType(JobDlivery jobDlivery);

    /**
     * 检查求职者是否对职位投递过简历
     * @param resumeUserId
     * @param positionId
     * @return
     */
    boolean checkPositionIsDelivery(Long resumeUserId,Long positionId);

    /**
     * 检查职位发布者是否对简历感兴趣
     * @param positionUserId
     * @param resumeUserId
     * @return
     */
    boolean checkResumeIsInterested(Long positionUserId,Long resumeUserId);
}
